package com.tanhua.sso.controller;

import com.tanhua.sso.service.SmsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RequestMapping("/user")
@RestController
public class SmsController {
    @Autowired
    private SmsService smsService;
    @PostMapping("/login")
    public Object sendCheckCode(@RequestBody Map<String,String> param){

        String phone = param.get("phone");
        return this.smsService.sendCheckCode(phone);
    }
}
